<!--
 * @Descripttion: 
 * @version: 
 * @Author: liangxh
 * @Date: 2020-07-13 14:34:34
 * @LastEditors: liangxh
 * @LastEditTime: 2020-07-13 14:36:29
--> 
<!--
 * @Descripttion: 
 * @version: 
 * @Author: liangxh
 * @Date: 2020-07-13 14:32:36
 * @LastEditors: liangxh
 * @LastEditTime: 2020-07-13 14:33:42
--> 
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>v-once</title>
</head>
<body>
  <div id="app">
    <h2>{{message}}</h2>
    <!-- 只会渲染一次，数据改变不会再次渲染 -->
    <h2 v-once>{{message}}</h2>
    <button @click='changeAction'>改变message</button>
  </div>
  <script src="https://cdn.bootcss.com/vue/2.6.11/vue.min.js"></script>
  <script>
    const app = new Vue({
      el:"#app",
      data:{
        message:"你好啊",
      },
      methods: {
        changeAction(){
            this.message = '改变message'
        }
      },
    })

  </script>
</body>
</html>